#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <string.h>

//字符串翻转
#if 0
int reverse_str(char* begin, char* end)
{
    if(begin == NULL || end == NULL)
    {
        return -1;
    }
    
    while(begin < end)
    {
        char tmp = *begin;
        *begin = *end;
        *end = tmp;
        begin++;
        end--;
    }
    return 0;
}

int main()
{
    char str[100] = {0};
    fgets(str, sizeof(str) - 1, stdin);
    str[strlen(str) - 1] = '\0';
    
    char* begin = str;
    char* end = str;
    while(*end != '\0')
    {
        while(*end != ' ' && *end != '\0')
        {
            end++;
        }
        
        reverse_str(begin, end-1);
        
        if(*end != '\0')
        {
            end++;
        }
        begin = end;
    }
    
    reverse_str(str, str+strlen(str)-1);
    printf("%s\n", str);
    return 0;
}
#endif

//最小公倍数
#if 0
int max_div_num(int max, int min)
{
    int z = 0;
    while(1)
    {
        z = max % min;
        if(z <= 0)
        {
            break;
        }
        max = min;
        min = z;
    }
    return min;
}

int main()
{
    int a, b;
    scanf("%d%d", &a, &b);
    
    printf("%d\n", (a * b) /(max_div_num(a, b)));
    return 0;
}
#endif


//水仙花
#if 0
int main()
{
	for (int i = 1; i < 100000; i++)
	{
		int tmp = i;
		int count = 0;
		while (tmp)
		{
			count++;
			tmp = tmp / 10;
		}

		tmp = i;
		int sum = 0;
		while (tmp)
		{
			sum +=  pow(tmp % 10, count);
			tmp = tmp / 10;
		}

		if (sum == i)
		{
			printf("%d\n", i);
		}
	}
	return 0;
}
#endif

